Web sites and applications as well as client devices are vulnerable to attack by malicious third parties. In some attacks, a browser extension may be abused to impair a client device on which the browser extension is operating, e.g., by downloading malicious executable files, hijacking user accounts, sniffing a user's web transactions, etc. In other attacks, browser extensions may be exploited to harm web sites visited by such client devices, e.g., by exploiting a web site's vulnerabilities to bypass two-factor authentication, launching Denial-of-Service (DOS) attacks, illegitimately scraping web site content, etc. Existing approaches to dealing with such attacks, such as server-side web application firewalls or client-side malware detection, do not fully address the range of threats.